package test.tabs;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Toast;

public class otherlayoutActivity extends Activity implements View.OnClickListener{
	static Context cxt;
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.otherlayout);
        Bundle backpack = getIntent().getExtras();
        System.out.println(11);

        //TabsActivity.car++;
        //int truck=TabsActivity.car;
        int truck = (Integer)backpack.get("THE TRUCK");
        System.out.println(12);
        cxt=this;
        findViewById(R.id.button1).setOnClickListener(this);
        Toast.makeText(this, "I HAVE " + truck + " TRUCKS", Toast.LENGTH_SHORT).show();
    
    }
	public void onClick(View v) {
		// TODO Auto-generated method stub
		Intent tent = new Intent(this, TabsActivity.class);
		cxt.startActivity(tent);
	}
}
